/**
 * Callback method for when form is shown.
 *
 * @param {Boolean} firstShow form is shown first time after load
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"B08194DB-193B-4186-9AFB-64E90E35CA1F"}
 */
function onShow(firstShow, event) {
	databaseManager.setAutoSave(false)
	controller.newRecord()
	
	fecha = application.getServerTimeStamp()
	
}

/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"1BA9F31F-D85A-4B47-A441-607A8E46A84A"}
 */
function confirmar(event) {
	if (databaseManager.saveData() == true)
	{
		estado = 1
		databaseManager.setAutoSave(true)
		forms.temas_dtl.controller.loadRecords(tema_id)
		forms.temas_dtl.controller.show()
	}
	else
	{
		globals.gDialog('Aviso','No se pudo crear el tema, vuelva a intentarlo','OK')
	}
}

/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"F104CEB3-9D61-485F-B8CC-D747B2CA04B1"}
 */
function cancelar(event) {
	databaseManager.rollbackEditedRecords()
	databaseManager.setAutoSave(true)
	globals.irAlMenu()
}
